<template>
	<view>

		<button type="warn"
			style="position: fixed;bottom: 10%;right: 5%;width: 60px;height: 60px;border-radius: 50%;display: flex;justify-content: center;align-items: center;box-shadow: 0 1px 8px 4px #ccc;z-index: 100;"
			@click="toGo"><uni-icons type="plusempty" size="30" color="#fff"></uni-icons></button>
		<uni-list>
			<uni-list-item showArrow v-for="item in data" :key="item.Id" :title="item.ContentInfo"
				:note="item.CreateTime.substring(0,19)" :ellipsis="2" clickable @click="toView(item)">
				<template v-slot:footer>
					<view style="display: flex;align-items: center;">
						<uni-tag text="已回复" size="small" type="success" v-if="item.ReplyStatus==2"
							style="font-weight: bold;" :circle="true"></uni-tag>
						<uni-tag text="未回复" size="small" type="error" :circle="true" v-else
							style="font-weight: bold;"></uni-tag>
					</view>
				</template>
			</uni-list-item>


		</uni-list>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: []

			}
		},
		onShow() {
			this.getDataList()
		},
		onPullDownRefresh() {
			console.log('refresh');
			this.getDataList()

		},
		methods: {
			toView(item) {
				uni.navigateTo({
					url: '/pages/feedback/feedbackView?Id=' + item.Id
				});
			},
			getDataList() {
				uni.showLoading({
					title: '加载中',
					mask: true,
				});
				this.$http('Base_Manage/Base_VIPUserFeedBack/GetDataListByMySelf', {
					SortField: 'CreateTime',
					SortType: "desc"
				}).then(res => {
					if (res.Success) {
						this.data = res.Data
					}
					uni.hideLoading()
					uni.stopPullDownRefresh();
				})
			},
			toGo() {
				console.log('1');
				uni.navigateTo({
					url: '/pages/feedback/feedbackInfo'
				});
			},
		}
	}
</script>

<style>

</style>